#include <basic_types.h>
#include <sys_config.h>

//#define SUPPORT_PACKET_26

#ifdef	SUPPORT_PACKET_26

static const UINT32 TTX_G2_Font[][96][9] = 
{
	//Latin G2 set, 0x20~0x7f maps to 0x20~0x7f
		{
		           { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  032  0x20
                   { 0x00000000, 0x0001c007, 0x001c0000, 0x01c00700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},    //  033  0x21
                   { 0x00000000, 0x18006001, 0x80060018, 0x01f01ff0, 0xffc3df0e, 0x603980f7, 0xc3ff07fc, 0x07c00600, 0x18000000},    //  034  0x22
                   { 0x00000000, 0x000ffc7f, 0xf9ffe7c7, 0x8f007f01, 0xfc07f01f, 0xc03c01fc, 0x67ff9efe, 0x79f00000, 0x00000000},    //  035  0x23
                   { 0x00000000, 0x3000c01f, 0xc0ffc3cf, 0x0f001f00, 0x1f001f00, 0x7c00f0f3, 0xc1fc01e0, 0x03000c00, 0x00000000},    //  036  0x24
                   { 0x00000000, 0x000000e0, 0x73c3c79e, 0x0ff01f80, 0x7e00f003, 0xc0fff3ff, 0xc0f003c0, 0x0f000000, 0x00000000},    //  037  0x25
                   { 0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0x3c7ff9ff, 0xe3cf0f3c, 0x3cf00000, 0x00000000},    //  038  0x26
                   { 0x00000000, 0x000ff07f, 0xf1e3c780, 0x1ff03ff1, 0xe3c7ff1f, 0xfc3fc003, 0xc78f1ffc, 0x3fc00000, 0x00000000},    //  039  0x27
                   { 0x00000000, 0x003c0ef0, 0x39e3c7ff, 0x07f878f1, 0xe3c78f1e, 0x3c1fe1ff, 0xc78f3e3e, 0xf0380000, 0x00000000},    //  040  0x28
                   { 0x00000000, 0x0003e00f, 0x803e00f0, 0x03c00780, 0x1e000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  041  0x29
                   { 0x00000000, 0x00071c1c, 0x71f7c79e, 0x1e787df1, 0xf7c00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  042  0x2a
                   { 0x00000000, 0x00004207, 0x3839c1ce, 0x0e707383, 0x9c0c603d, 0xe07bc0f7, 0x81ef01ce, 0x01000000, 0x00000000},    //  043  0x2b
                   { 0x00000000, 0x0003c01f, 0x00f807c0, 0x3c00fffb, 0xffefffbf, 0xfef001f0, 0x03e007c0, 0x0f000000, 0x00000000},    //  044  0x2c
                   { 0x00000000, 0x0003c01f, 0x80ff07fe, 0x3ffeef7b, 0x3ce0f003, 0xc00f003c, 0x00f003c0, 0x0f003c00, 0x00000000},    //  045  0x2d
                   { 0x00000000, 0x0003c00f, 0x800f001e, 0x003efffb, 0xffefffbf, 0xfe00f807, 0x803c03e0, 0x0f000000, 0x00000000},    //  046  0x2e
                   { 0x00000000, 0x0003c00f, 0x003c00f0, 0x03c00f00, 0x3c00f033, 0xceef7bff, 0xe7fe0ff0, 0x1f803c00, 0x00000000},    //  047  0x2f
                   { 0x00007e03, 0xfc0c303f, 0xc07e0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  048  0x30
                   { 0x00000000, 0x0001e007, 0x801e0078, 0x1ffc7ff1, 0xffc07801, 0xe0078000, 0x00001ffc, 0x7ff00000, 0x00000000},    //  049  0x31
                   { 0x00000007, 0xf01fc00f, 0x003c01f0, 0x0f807c01, 0xfc07f000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  050  0x32
                   { 0x0000000f, 0x803f003c, 0x03f00f80, 0x0f00fc03, 0xf0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  051  0x33
                   { 0x00000000, 0x00000000, 0x00000000, 0x1c1c78f0, 0xff83fe07, 0xf00f807f, 0x03fe1e3c, 0x70700000, 0x00000000},    //  052  0x34
                   { 0x00000000, 0x00000000, 0x00000000, 0x1c3870e1, 0xc3870e1c, 0x3870e1c3, 0x870e1ff8, 0x7fc1c007, 0x001c0000},    //  053  0x35
                   { 0x00000000, 0x0000007f, 0xf9ffec63, 0x318c7e31, 0xf8c06301, 0x8c063018, 0xc063018c, 0x06300000, 0x00000000},    //  054  0x36
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000f00, 0x3c00f000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  055  0x37
                   { 0x00000000, 0x0003c00f, 0x003c0000, 0x00007fe1, 0xff87fe1f, 0xf8000000, 0x00f003c0, 0x0f000000, 0x00000000},    //  056  0x38
                   { 0x00000000, 0x0003e00f, 0x803e0078, 0x01e00f00, 0x3c000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  057  0x39
                   { 0x00000000, 0x001f7c7d, 0xf1f7c3cf, 0x0f3c79c1, 0xe7000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  058  0x3a
                   { 0x00000000, 0x00108073, 0x80e701ce, 0x039c0738, 0x0e7018c1, 0xef0f787b, 0xc3de1ce0, 0x02000000, 0x00000000},    //  059  0x3b
                   { 0x00000000, 0x003c38f1, 0xe3c70f3c, 0x3cc0f6fb, 0xffefddbf, 0x763b19ff, 0xe77fb006, 0xc0180000, 0x00000000},    //  060  0x3c
                   { 0x00000000, 0x003c38f0, 0xe3c60f38, 0x3cc0f7fb, 0xffefc7bf, 0x1e38f9e7, 0xc73e3cfe, 0xc3f80000, 0x00000000},    //  061  0x3d
                   { 0x00000000, 0x000000f8, 0x73f3c3ce, 0x3f78f900, 0xfdefffbf, 0x3e3918e4, 0x67ff9dfe, 0xc01b0060, 0x00000000},    //  062  0x3e
                   { 0x00000000, 0x0001e007, 0x801e0000, 0x01e00780, 0xfe07c01e, 0x007879e1, 0xe7879ffe, 0x3ff00000, 0x00000000},    //  063  0x3f
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  064  0x40
                   { 0x1c003800, 0x7001c000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  065  0x41
                   { 0x03c01e00, 0xf003c000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  066  0x42
                   { 0x07801e01, 0xce073800, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  067  0x43
                   { 0x3f98fe63, 0x1f8c7e00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  068  0x44
                   { 0x0000ffc3, 0xff0ffc00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  069  0x45
                   { 0x3870e1c0, 0xfc03f000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  070  0x46
                   { 0x00000000, 0xf003c00f, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  071  0x47
                   { 0x00000003, 0xcf0f3c3c, 0xf0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  072  0x48
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00003c00, 0xf003c000},    //  073  0x49
                   { 0x1f80ff03, 0x0c0ff01f, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  074  0x4a
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x80060018, 0x00600180, 0x0600f803, 0xe00f8000},    //  075  0x4b
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0001ffc7, 0xff1ffc00},    //  076  0x4c
                   { 0x1c70e387, 0x1c1c7000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  077  0x4d
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60018006, 0x00180060, 0x018007c0, 0x1f007c00},    //  078  0x4e
                   { 0x1ce07380, 0x7801e000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  079  0x4f
                   { 0x00000000, 0x00000000, 0x00000000, 0x0000fffb, 0xffefffbf, 0xfe000000, 0x00000000, 0x00000000, 0x00000000},    //  080  0x50
                   { 0x00000000, 0x003c00f0, 0x03c00f00, 0x3c00f003, 0xc00f003c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  081  0x51
                   { 0x0fc07f82, 0x011002df, 0xcf7fbd8e, 0xf63bd8ef, 0x63bdfcf7, 0xe3dbcf67, 0xbd8ef61b, 0xd82d0023, 0xff07f800},    //  082  0x52
                   { 0x00000001, 0xff0ffe60, 0x0f1f3dfc, 0xf7f3dc4f, 0x603d80f7, 0x13dfcf7f, 0x3c7cf003, 0x7ff8ffc0, 0x00000000},    //  083  0x53
                   { 0x00000000, 0x000000ff, 0x1ffc767b, 0xd9ef67bd, 0x9ef67fd9, 0xbb66ed9b, 0xb664d993, 0x664c0000, 0x00000000},    //  084  0x54
                   { 0x00001c00, 0x7801f007, 0xe01fe077, 0x81ce0700, 0x1c007001, 0xc03f01fc, 0x0ff03fc0, 0x7e00f000, 0x00000000},    //  085  0x55
                   { 0x0003ff0f, 0xfc3000c0, 0x033ffcff, 0xf380ce03, 0x380ce03f, 0xfefff838, 0x00e00380, 0x0ffc3ff0, 0x00000000},    //  086  0x56
                   { 0x0000e067, 0xc39b1c6c, 0x61f30398, 0x00c00e00, 0x7003801b, 0x8e5f7c6d, 0xb1f7c38e, 0x00000000, 0x00000000},    //  087  0x57
                   { 0x00000000, 0x00000000, 0x00fc03f0, 0x1ce6e1fb, 0x038c0c38, 0xe0f3c3ff, 0x87ff8fc6, 0x3f000000, 0x00000000},    //  088  0x58
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  089  0x59
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  090  0x5a
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  091  0x5b
                   { 0x00000000, 0x003c38f0, 0xe3c60f38, 0x3cc0f7ff, 0xfffff1ff, 0xc73bfdef, 0xf73ffcc7, 0xc31c0ff0, 0x3fc00000},    //  092  0x5c
                   { 0x00000000, 0x000038f8, 0xe3f603f8, 0x3fc0fffc, 0xfffff1ff, 0xc73bfccf, 0xf73fdcc7, 0xc31f0ff0, 0x3fc00000},    //  093  0x5d
                   { 0x00000000, 0x000038f8, 0xe3e60e38, 0x39c0fffc, 0xfffff1ff, 0xc73bfccf, 0xf73fdcc7, 0xc31f0ff0, 0x3fc00000},    //  094  0x5e
                   { 0x00000000, 0x003e38f8, 0xe06601b8, 0x06c01ffc, 0x7ff1f1c7, 0xc73bfdef, 0xf73ffcc7, 0xc31c0ff0, 0x3fc00000},    //  095  0x5f
                   { 0x00000000, 0x00000007, 0x80ffc3cf, 0x1e1ef03f, 0xc0ff03dc, 0x0e3870e1, 0xcfcfff3f, 0xfcfc0000, 0x00000000},    //  096  0x60
                   { 0x00000000, 0x0001fe07, 0xf87f01fc, 0x0f7039c1, 0xffe7ff9f, 0xfe61c187, 0x061c1870, 0x61f987e0, 0x00000000},    //  097  0x61
                   { 0x00000000, 0x0000007f, 0x81ff879e, 0x1e3c78f3, 0xfbcfef1e, 0x3c78f1e3, 0xc79e1ff8, 0x7f800000, 0x00000000},    //  098  0x62
                   { 0x00000000, 0x0000001f, 0x78ffe7cf, 0x9f3e7879, 0xe1e7879f, 0x3e3ff87d, 0xe0000000, 0x7ff9ffe0, 0x00000000},    //  099  0x63
                   { 0x00000000, 0x000f3c3c, 0xf0f3c7ff, 0x9ffe7ff8, 0xf3c3cf0f, 0xfc3ff0f3, 0xc3cf0f3c, 0x3cf00000, 0x00000000},    //  100  0x64
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},    //  101  0x65
                   { 0x00000000, 0x000000e0, 0x7381ce07, 0x381ce073, 0x81ce0738, 0x1cee73b9, 0xcef739f8, 0xe3c00000, 0x00000000},    //  102  0x66
                   { 0x00000000, 0x0000001c, 0x007001c0, 0x07001c00, 0x73c1cf07, 0x3c1c0070, 0x01c007fc, 0x1ff00000, 0x00000000},    //  103  0x67
                   { 0x00000000, 0x000f003c, 0x60f383de, 0x0ff03f80, 0xfc03e01f, 0x00fc03f0, 0x0fff8ffe, 0x3ff80000, 0x00000000},    //  104  0x68
                   { 0x00000000, 0x00c00307, 0x98ffc38f, 0x1c3e71b9, 0xcce7639f, 0x0e7839e1, 0xe7cf3ffc, 0x87800000, 0x00000000},    //  105  0x69
                   { 0x00007ff1, 0xffccf073, 0xc1cf071c, 0x1c7071c1, 0x87f61fd8, 0x7f61c187, 0x061c1870, 0x61c0fff1, 0xffc00000},    //  106  0x6a
                   { 0x00000000, 0xf80ff87d, 0xf1e3c78f, 0x1e3c78f1, 0xf7c3fe03, 0xe0000000, 0x00001ffc, 0x7ff1ffc0, 0x00000000},    //  107  0x6b
                   { 0x0003f00f, 0xc01c0070, 0x01de07fe, 0x1f3c7cf1, 0xe3c78f1e, 0x3c7cf1ff, 0x87f81e00, 0xfc03f000, 0x00000000},    //  108  0x6c
                   { 0x00000000, 0x000000ff, 0xfbffe0f0, 0x03c00f00, 0xff83fe03, 0xc00f003c, 0x00f003c0, 0x0f000000, 0x00000000},    //  109  0x6d
                   { 0x00000007, 0xfc1ffc78, 0xf1e3c78f, 0x1e3c78f1, 0xe3c78f1e, 0x3c78f1e3, 0xc78f1e3c, 0x00f003c0, 0x0f003c00},    //  110  0x6e
                   { 0x0000000e, 0x001c0038, 0x00e00000, 0x1ff07ff1, 0xe3c78f1e, 0x3c78f1e3, 0xc78f1e3c, 0x78f00000, 0x00000000},    //  111  0x6f
                   { 0x00000000, 0x000000f0, 0x03c00f00, 0x3cf0f783, 0xfc0fe03f, 0x00fc03fc, 0x0f783cf0, 0xf0e00000, 0x00000000},    //  112  0x70
                   { 0x00000000, 0x00000000, 0x00000fcf, 0xbfbfcfdc, 0x1e3fffff, 0xffc783bf, 0x3fefdf3f, 0x00000000, 0x00000000},    //  113  0x71
                   { 0x00000000, 0x00003c00, 0xf01fe07f, 0x81fe00f1, 0xffcfff3f, 0xfcf0f3c3, 0xcf0f3ffc, 0x7ff00000, 0x00000000},    //  114  0x72
                   { 0x0000f003, 0xc007807f, 0xf1ffc7ff, 0x007800f1, 0xffcfff3f, 0xfcf0f3c3, 0xcf0f3ffc, 0x7ff00000, 0x00000000},    //  115  0x73
                   { 0x00000007, 0x001c00fe, 0x03f80fe0, 0x1c007fc1, 0xff87fe1c, 0x3870e1c3, 0x870e1c38, 0x70e00000, 0x00000000},    //  116  0x74
                   { 0x00000000, 0x00000000, 0x00000000, 0x00000700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07000000, 0x00000000},    //  117  0x75
                   { 0x00000000, 0x001e3c78, 0xf0000000, 0x1e3c78f1, 0xe3c78f1e, 0x3c78f1e3, 0xc78f1e3c, 0x00f00fc0, 0x3e000000},    //  118  0x76
                   { 0x00000000, 0x0000001c, 0x007001c0, 0x07001c00, 0x73c1cf07, 0x3c1c0070, 0x01c00700, 0x1c000000, 0x00000000},    //  119  0x77
                   { 0x00000000, 0x000fe63f, 0xb8ffe07e, 0x01f00f80, 0x7e07f81d, 0xe007801e, 0x07fe1ff8, 0x7fe00000, 0x00000000},    //  120  0x78
                   { 0x00000000, 0x00000000, 0x00000003, 0x07f83fe1, 0xc7c6371d, 0x9c7c71e1, 0xc78f1ff8, 0xcf820000, 0x00000000},    //  121  0x79
                   { 0x00000000, 0x00000000, 0x00000000, 0x1ffc7ffb, 0x3cfce1f3, 0xffcfff38, 0x0cf1ffff, 0x7ff80000, 0x00000000},    //  122  0x7a
                   { 0x00000000, 0x0000001f, 0xc0ffc7cf, 0x1e3c7bf1, 0xef07bf9e, 0x1e7879e1, 0xe7bf9efc, 0x7801e007, 0x801e0000},    //  123  0x7b
                   { 0x00000000, 0x00000070, 0x01c00700, 0x1de07fe1, 0xf3c7cf1e, 0x3c78f1e3, 0xc7cf1ff8, 0x7f81e007, 0x801e0000},    //  124  0x7c
                   { 0x00000000, 0x00000003, 0x003c00f0, 0x07f01fc0, 0x3c01fc07, 0xf00f003c, 0x00f003f0, 0x03c00000, 0x00000000},    //  125  0x7d
                   { 0x00000000, 0x00000000, 0x00000000, 0x1ff07ff1, 0xe3c78f1e, 0x3c78f1e3, 0xc78f1e3c, 0x78f003c0, 0x0f003c00},    //  126  0x7e
                   { 0x0001ffe7, 0xff9ffe7f, 0xf9ffe7ff, 0x9ffe7ff9, 0xffe7ff9f, 0xfe7ff9ff, 0xe7ff8000, 0x00000000, 0x00000000},    //  127  0x7f
		},
};

UINT32* get_char_from_g2(UINT8 charset, UINT8 character, UINT8 i)
{
   return((UINT32*)&TTX_G2_Font[charset][character][i]);
}

#endif
